package edu.wit.common.exception;

/**
 *  定义错误类型
 */
public enum ResultEnums {

	SYSTEM_ERROR(40001,"系统错误"),
	METHOD_NOT_SUPPORTED(40002,"请求方式错误"),
	RECEIVE_MESSAGE_ERROR(40003,"消息消费异常"),
	MAX_UPLOAD_SIZE_ERROR(40004,"文件上传大小超过系统限制"),
	ZUULTIMEOUT_ERROR(40005,"网关超时"),
	STRING_INDEX_OUT_OF_BOUNDS_ERROR(40006,"字符串下标越界"),
	ARRAY_INDEX_OUT_OF_BOUNDS_ERROR(40007,"数组下标越界"),
	THREE_APP_ERROR(50001,"签名ID或秘钥错误"),
    SIGN_TERROR(50002,"sign签名错误"),
	PARAM_ERROR(50020,"参数错误"),
	ID_EXIST_ERROR(50040,"id不存在"),

	SERVICE_ERROR(50100,"调用服务失败"),
	LOGIC_ERROR(50110,"流程配置业务异常"),
	FILE_ERROR(50120,"文件异常"),
	INTERFACE_ERROR(50130,"第三方接口异常"),
	TEACHER_SUBJECT_CONFLICT_ERROR(50140,"教师课程冲突错误"),

	AUTH_USER_IN_FOUND_ERROR(50169,"已存在"),
	AUTH_USER_NOT_FOUND_ERROR(50170,"用户不存在"),
	AUTH_USER_BIND_CODE_PAST_ERROR(50171,"第三方用户绑定超时,请重新进行第三方授权"),
	AUTH_WX_CODE_PAST_ERROR(50172,"第三方授权码错误或已被使用"),
	AUTH_ACCOUNT_FORMAT_ERROR(50173,"账号格式错误"),
	AUTH_SMS_CODE_ERROR(50174,"手机号登录短信验证码错误"),
	AUTH_INVALID_TOKEN(50175,"token不存在"),
	AUTH_CLIENT_GRANT_TYPE_ERROR(50177,"当前clientId中不支持当前grant_type类型"),
	AUTH_LOGIN_VALIDCODE_ERROR(50178,"验证码错误"),
	AUTH_UNAUTHORIZED_ERROR(401,"unauthorized"),
	AUTH_FORBIDDEN_ERROR(403,"禁止访问"),
    NOT_FOUND_ERROR(404,"Not Found"),

	SUCCESS(200,"success");

    /**
     * 代码值
     */
	private Integer code;

    /**
     * 提示内容
     */
	private String msg;

	ResultEnums(Integer code, String msg){
		this.code = code;
        this.msg = msg;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

}
